/*******************************************
 *                                         *
 *******************************************/

#ifndef GRAPHICSDEVICE_H
#define GRAPHICSDEVICE_H

//Link DLL
#pragma comment (lib, "d3d9.lib")

//Include DirectX Headers
#include <d3d9.h>
#include "..\Windows\Window.h"
#include "..\Helpers.h"

using namespace WindowsFramework;

//DirectXFramework Class Declaration
namespace DirectXFramework
{
	namespace Graphics
	{
		class GraphicsDevice
		{
			public:
				//Constructors
				GraphicsDevice (void);
				GraphicsDevice (Window & GameWindow);
				//Destructors
				~GraphicsDevice (void);

				//Public Methods
				BOOL Init (Window & GameWindow);
				void BeginRendering (void);
				void EndRendering (void);
				void Clear (void);

				//Setters
				void SetClearColor (int Red, int Green, int Blue, int Alpha);

				//Getters
				LPDIRECT3DDEVICE9 GetDrawDevice (void);
				LPDIRECT3D9 GetDirectXDevice (void);

			private:
				//Private Methods
				BOOL InitD3D (Window & GameWindow);
				void CleanD3D (void);

				//DirectX Members
				LPDIRECT3D9 d3d;
				LPDIRECT3DDEVICE9 d3ddev;
				DWORD ClearColor;
		};

		//Create Pointer Variable
		typedef GraphicsDevice* LPGRAPHICSDEVICE;
	};
};

#endif